package com.dz.Incubator.properties.oss.file;


import com.dz.Incubator.properties.oss.FileClient;
import com.dz.Incubator.utils.sms.sdk.utils.DateUtil;

import java.io.InputStream;
import java.util.Date;

public abstract class OssFile {

	protected String docprefix;

	private String name;

	private InputStream stream;

	private String location; // 云端存储路径

	private String bucket = FileClient.fileBucket;


	public String getBucket() {
		return bucket;
	}

	public void setBucket(String bucket) {
		this.bucket = bucket;
	}

	/**
	 * @return the docprefix
	 */
	public String getDocprefix() {
		return DateUtil.dateToStr(new Date(), 2);
	}

	/**
	 * @param docprefix
	 *            the docprefix to set
	 */
	public void setDocprefix(String docprefix) {
		this.docprefix = docprefix;
	}

	/**
	 * @return the stream
	 */
	public InputStream getStream() {
		return stream;
	}

	/**
	 * @param stream
	 *            the stream to set
	 */
	public void setStream(InputStream stream) {
		this.stream = stream;
	}

	/**
	 * @return the location
	 */
	public String getLocation() {
		return location;
	}

	/**
	 * @param location
	 *            the location to set
	 */
	public void setLocation(String location) {
		this.location = location;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

}
